<div id="content">
	<div id="left">
		<?php
		$this->widget ( 'application.modules.manage.widgets.ViewWidgets', array (
				'view' => 'nav_contentmore' 
		) );
		?>
	</div>
	<div id="right">
		<div class="box">
			<div class="title">
				<h5>内容管理>招聘管理</h5>
			</div>
            <?php
            if($this->actExist('Add')){
                ?>
                <div class="viewbar tar ptr10">
                    <?php $this->actPermission('<button class="btn" onclick="showedit(0)">添加</button>',"Add");?>
                </div>
            <?php
            }
            ?>
			<form action="index" name="form_view">
				 <input type="hidden" name="current"/>
				<div class="table">
					<table>
						<thead>
							<tr>
								<th class="tal">标题</th>
								<th>排序</th>
								<th>更新时间</th>
                                <th>模块</th>
                                <?php
                                if($this->actExist('Edit,Del')){
                                    ?>
                                    <th class="last" style="width: 150px;">工具</th>
                                <?php
                                }
                                ?>
							</tr>
						</thead>
						<tbody>
						<?php
						if(sizeof($employees)>0){
foreach ( $employees as $e ) {
	?>
<tr>
								<td><?php echo $e['title'];?></td>
								<td class="tac"><?php echo $e['orderby'];?></td>
								<td class="tac"><?php echo $e['createtime'];?></td>
                                <td class="tac"><?php echo $e['category'];?></td>
    <?php
    if($this->actExist('Edit,Del')){
        ?>
                                <td class="tac">
                                    <?php
                                    $eid = $e['employ_id'];
                                    $this->actPermission('<button class="btn" onclick="showedit('.$eid.')">编辑</button>','Edit');
                                    $this->actPermission('<button class="btn" onclick="del('.$eid.')">删除</button>','Del');
                                    ?>
                                    </td>
    <?php
    }
    ?>
							</tr>
<?php
						}
}
						
						?>
					</tbody>
					</table>
				<?php echo $pagebar->buildBar();?>
			</div>
			</form>
		</div>
	</div>
</div>
<script>
    var current = <?php echo $pagebar->current;?>;
    function showedit(id){
        window.location.href="showedit?id="+id+"&current="+current;
    }
    function del(id){
        confirm(function(){
            window.location.href="del?id="+id+"&current="+current;
        },'是否删除招聘？')
    }
</script>